package com.ruoyi.base.service.impl;

import java.util.List;
import java.util.UUID;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.base.mapper.BusWaterRainfallstationMapper;
import com.ruoyi.base.domain.BusWaterRainfallstation;
import com.ruoyi.base.service.IBusWaterRainfallstationService;

/**
 * 雨量站Service业务层处理
 * 
 * @author maliang
 * @date 2025-07-27
 */
@Service
public class BusWaterRainfallstationServiceImpl implements IBusWaterRainfallstationService 
{
    @Autowired
    private BusWaterRainfallstationMapper busWaterRainfallstationMapper;

    /**
     * 查询雨量站
     * 
     * @param id 雨量站主键
     * @return 雨量站
     */
    @Override
    public BusWaterRainfallstation selectBusWaterRainfallstationById(String id)
    {
        return busWaterRainfallstationMapper.selectBusWaterRainfallstationById(id);
    }

    /**
     * 查询雨量站列表
     * 
     * @param busWaterRainfallstation 雨量站
     * @return 雨量站
     */
    @Override
    public List<BusWaterRainfallstation> selectBusWaterRainfallstationList(BusWaterRainfallstation busWaterRainfallstation)
    {
        return busWaterRainfallstationMapper.selectBusWaterRainfallstationList(busWaterRainfallstation);
    }

    /**
     * 新增雨量站
     * 
     * @param busWaterRainfallstation 雨量站
     * @return 结果
     */
    @Override
    public int insertBusWaterRainfallstation(BusWaterRainfallstation busWaterRainfallstation)
    {
        busWaterRainfallstation.setId(UUID.randomUUID().toString());
        busWaterRainfallstation.setUpdatetime(DateUtils.getNowDate());
        return busWaterRainfallstationMapper.insertBusWaterRainfallstation(busWaterRainfallstation);
    }

    /**
     * 修改雨量站
     * 
     * @param busWaterRainfallstation 雨量站
     * @return 结果
     */
    @Override
    public int updateBusWaterRainfallstation(BusWaterRainfallstation busWaterRainfallstation)
    {
        busWaterRainfallstation.setUpdatetime(DateUtils.getNowDate());
        return busWaterRainfallstationMapper.updateBusWaterRainfallstation(busWaterRainfallstation);
    }

    /**
     * 批量删除雨量站
     * 
     * @param ids 需要删除的雨量站主键
     * @return 结果
     */
    @Override
    public int deleteBusWaterRainfallstationByIds(String[] ids)
    {
        return busWaterRainfallstationMapper.deleteBusWaterRainfallstationByIds(ids);
    }

    /**
     * 删除雨量站信息
     * 
     * @param id 雨量站主键
     * @return 结果
     */
    @Override
    public int deleteBusWaterRainfallstationById(String id)
    {
        return busWaterRainfallstationMapper.deleteBusWaterRainfallstationById(id);
    }
}
